import Vue from "vue";
import App from "./App.vue";
import ElementUI from "element-ui";
import router from "./router/index";
import icdDesigner from "iss-library-form-designer";
import "iss-library-form-designer/iss-library-form-designer.css";
import "remixicon/fonts/remixicon.css";
import "element-ui/lib/theme-chalk/index.css";
import 'systemjs/dist/system';
Vue.config.productionTip = false;

Vue.use(ElementUI);
async function render(props = {}) {
  const { container } = props;

  icdDesigner.install(
    Vue,
    {
      aceurl: "./ace",
      mce_language_url: "./tinymce/langs/zh_CN.js",
      mce_skin_url: "./tinymce/ui/oxide",
      mce_content_css: "./tinymce/content/content.css",
    },
    {}
  );

  function initVue() {
    new Vue({
      router,
      render: (h) => h(App),
    }).$mount(container ? container.querySelector("#app") : "#app");
  }
  initVue();
}

render();
